const images = document.querySelector('.images');
    const minIndicators = document.querySelectorAll('.min li');
    const totalImages = minIndicators.length;
    let currentIndex = 0;
    function goToSlide(index) {
        if (index < 0) index = totalImages - 1; 
        if (index >= totalImages) index = 0;
        images.style.transform = `translateX(${-index * 1500}px)`; 
        currentIndex = index;
        minIndicators.forEach((indicator, i) => {
            indicator.classList.toggle('active', i === index);
        });
    }
    let autoPlayInterval;
    function startAutoPlay() {
        autoPlayInterval = setInterval(() => {
            goToSlide(currentIndex + 1);
        }, 3000);
    }

    function stopAutoPlay() {
        clearInterval(autoPlayInterval);
    }
    startAutoPlay();
    minIndicators.forEach((indicator, index) => {
        indicator.addEventListener('click', () => {
            goToSlide(index);
        });
    });